<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.kylin.common.dict.orm.Dict,
                                 com.kylin.module.shop.orm.*,
                                 java.util.*" %>
<%@ include file="/common/include/includeHeader.jsp"%>
<table border=0 width="100%"><tr><td align="center">
      公司信息
<mytag:MyActionMsg />
<%
    if(request.getAttribute(Constants.KEY_REQUEST_RESULT )!= null){
    User companyUser = null;
         List comList = (List)request.getAttribute(Constants.KEY_REQUEST_RESULT );
         for(int i=0;i < comList.size() ; i++){
             Company com = (Company)comList.get(i);
             if(i==0){
             	companyUser = com.getUser();
				 if(companyUser == null)
	                 return;
                 if( Constants.ACTIVE_OFF.equals(companyUser.getActive()))
                     out.println(" &nbsp;状态：暂停");
                 else if( Constants.ACTIVE_ON.equals(companyUser.getActive()))
                     out.println(" &nbsp;状态：激活");
             }
                     
%>

      <table width="80%"  border="0" cellspacing="1" cellpadding="0">
        <tr class="c02">
          <td height="30"><b>投放语言：</b></td>
          <td>
             <%=UTool.getLanguageName(com.getLanguage(),sessionLocale) %>
			</td>
        </tr>
        <tr  class="c03" width="60">
          <td height="30"><b>用户名:</b></td>
          <td><%=com.getUser().getUsername()%></td>
        </tr>
        <tr  class="c03">
          <td width="80" height="30"><b>公司名称:</b></td>
          <td><%=com.getName() %></td>
        </tr>
        <tr class="c03">
          <td height="30"><b>所属国家:</b></td>
          <td>
			<%= UTool.getCountryName( com.getUser().getCountry(),sessionLocale) %>
          </td>
        </tr>
        <tr class="c03">
          <td height="30"><b>主营行业:</b></td>
          <td>
<%
 			Set mb = com.getMainbusiness();
 			CompanyInd[] cis = (CompanyInd[])mb.toArray(new CompanyInd[0]);
 			if(cis != null)
 			   for(int m= 0; m < cis.length; m++){
 			       out.println(cis[m].getIndustry()+"<br>");
 			   }
 %>
			</td>
        </tr>
        <tr class="c03">
          <td height="30"><b>主营类别:</b></td>
          <td>
<%
 			Set mc = com.getMaincatproduct();
 			CompanyCat[] ccs = (CompanyCat[])mc.toArray(new CompanyCat[0]);
 			if(cis != null)
 			   for(int m= 0; m < ccs.length; m++){
 			       out.println(ccs[m].getCatproduct()+"<br>");
 			   }
 %>

		  </td>
        </tr>
        <tr class="c03">
          <td height="30"><b>联系人:</b></td>
          <td><%=com.getContact() %></td>
        </tr>
        <tr class="c03">
          <td height="30"><b>电话:</b></td>
          <td><%=com.getPhoneCountry() %> 
            <%=com.getPhoneArea() %>
            <%=com.getPhone()%></td>
        </tr>
        <tr class="c03">
          <td height="30"><b>传真:</b></td>
          <td>
          <%=com.getFaxCountry() %>
          <%=com.getFaxArea() %>
          <%=com.getFax() %>
		</td>
        </tr>
        <tr class="c03">
          <td height="30"><b>邮箱:</b></td>
          <td><%=com.getEmail()%></td>
        </tr>
		<tr class="c03">
          <td height="30"><b>地址:</b></td>
          <td><%=com.getAddress()%></td>
        </tr>
        <tr class="c03">
          <td height="30"><b>邮编:</b></td>
          <td><%=com.getPostcode()%></td>
        </tr>
      </table>
<%
     }
%>
     <form name="fostop" method="post" action="/admin/shop/manageShop.do?CMD=changeCompanyActive">
     	<input type="hidden" name="userid" value="<%=companyUser.getId()%>"> 
<%
	if( Constants.ACTIVE_ON.equals(companyUser.getActive())){
%>   	
     	<input type="hidden" name="active" value="<%=Constants.ACTIVE_OFF %>"> 
		<input type="submit" value="暂停此账户">
<%   
     }else{
%>
     	<input type="hidden" name="active" value="<%=Constants.ACTIVE_ON %>"> 
		<input type="submit" value="恢复此账户">
<%     
     }
     out.print("</form>");
  }
%>
</td></tr></table>

